package com.example.teach.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.teach.entity.Major;
import com.example.teach.mapper.MajorMapper;
import com.example.teach.service.MajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MajorServiceImpl extends ServiceImpl<MajorMapper, Major> implements MajorService {

    @Autowired
    private MajorMapper majorMapper;

    @Override
    public void updateById(Integer majorId, String majorName) {
        majorMapper.updateById(majorId,majorName);
    }

    @Override
    public void updatestatus(Integer id) {
        majorMapper.updateStatus(id);
    }

    @Override
    public void updateStatusToZero(Integer majorId) {
        majorMapper.updateStatusToZero(majorId);
    }
}
